package com.xukang.batch.controller;

import com.xukang.batch.po.Users;
import com.xukang.batch.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Mr.NaCl
 * @since 2024/9/26
 */
@Slf4j
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource
    private UserService userService;

    @GetMapping("/insert")
    public Integer insert() {
        return userService.insert();
    }

    @GetMapping("/findAll")
    public List<Users> findAll() {
        return userService.findAll();
    }


}
